package com.dailyblue.java.design.观察者模式;

public class App {
    public static void main(String[] args) {
        Subject subject = new WelfareLottery();
        for (int i = 0; i < 10; i++) {
            LotteryBuyer lotteryBuyer = new LotteryBuyer(subject);
            subject.registerObserver(lotteryBuyer);
        }
        subject.notifyObserver();
    }
}
